﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Edu.Web.Biz;
using Edu.Web.Data.Service;

namespace Edu.Web.Controllers
{
    public class HomeController : BaseController
    {
        private readonly IClazzService _clazzService;

        public HomeController(IClazzService clazzService)
        {
            _clazzService = clazzService;
        }

        // GET: Home
        public ActionResult Index()
        {
            ViewBag.RealName = CurrentUser.RealName;
          //  var clazzList = _clazzService.LoadClazzByUserId(CurrentUser.UserId,CurrentUser.UserType);
            if (CurrentUser.UserType == 2)
            {
                if (CurrentUser.TeacherType == 1)
                {
                    return View("fTIndex");
                }
                else
                {
                    return View("nTIndex");
                }
            }
            else
            {
                return View("Index");
            }
        }
    }
}